#include"process.h"
#define targetsize 1024*1024//1MB
#define process_size 1024*10
void download(callback_t cb)
{
    int target=targetsize;
    int total=0;
    while(total<=target)
    {
        usleep(runtime);
        total+=process_size;
        double rate=total*100.0/target;
        cb(rate);
    }
    cb(maxrate);
    printf("\n");
}

int main()
{
    download(process_v2);
    return 0;
}
